home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 January: Mac OS SDK / Dev.CD Jan 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / AIncludes / Lists.a < prev    next >
Encoding:
Text File  |  1997-08-12  |  10.9 KB  |  460 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        Lists.a
  3. ;
  4. ;    Contains:    List Manager Interfaces.
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Release:    Universal Interfaces 3.0.1
  8. ;
  9. ;    Copyright:    © 1985-1997 by Apple Computer, Inc., all rights reserved
  10. ;
  11. ;    Bugs?:        Please include the the file and version information (from above) with
  12. ;                the problem description.  Developers belonging to one of the Apple
  13. ;                developer programs can submit bug reports to:
  14. ;
  15. ;                    devsupport@apple.com
  16. ;
  17. ;
  18.     IF &TYPE('__LISTS__') = 'UNDEFINED' THEN
  19. __LISTS__ SET 1
  20.  
  21.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  22.     include 'Types.a'
  23.     ENDIF
  24.     IF &TYPE('__CONTROLS__') = 'UNDEFINED' THEN
  25.     include 'Controls.a'
  26.     ENDIF
  27.  
  28. Cell                    RECORD 0
  29. f                         ds        Point
  30. sizeof                     EQU *                    ; size:   $4 (4)
  31.                         ENDR
  32.  
  33.  
  34. ListBounds                RECORD 0
  35. f                         ds        Rect
  36. sizeof                     EQU *                    ; size:   $8 (8)
  37.                         ENDR
  38.  
  39.  
  40. DataArray                RECORD 0
  41. elements                 ds.b    32001
  42.                          ORG 32002
  43. sizeof                     EQU *                    ; size:   $7D02 (32002)
  44.                         ENDR
  45.  
  46.  
  47.  
  48.  
  49. ListRec                    RECORD 0
  50. rView                     ds        Rect            ; offset: $0 (0)
  51. port                     ds.l    1                ; offset: $8 (8)
  52. indent                     ds        Point            ; offset: $C (12)
  53. cellSize                 ds        Point            ; offset: $10 (16)
  54. visible                     ds        ListBounds        ; offset: $14 (20)
  55. vScroll                     ds.l    1                ; offset: $1C (28)
  56. hScroll                     ds.l    1                ; offset: $20 (32)
  57. selFlags                 ds.b    1                ; offset: $24 (36)
  58. lActive                     ds.b    1                ; offset: $25 (37)
  59. lReserved                 ds.b    1                ; offset: $26 (38)
  60. listFlags                 ds.b    1                ; offset: $27 (39)
  61. clikTime                 ds.l    1                ; offset: $28 (40)
  62. clikLoc                     ds        Point            ; offset: $2C (44)
  63. mouseLoc                 ds        Point            ; offset: $30 (48)
  64. lClickLoop                 ds.l    1                ; offset: $34 (52)
  65. lastClick                 ds        Cell            ; offset: $38 (56)
  66. refCon                     ds.l    1                ; offset: $3C (60)
  67. listDefProc                 ds.l    1                ; offset: $40 (64)
  68. userHandle                 ds.l    1                ; offset: $44 (68)
  69. dataBounds                 ds        ListBounds        ; offset: $48 (72)
  70. cells                     ds.l    1                ; offset: $50 (80)
  71. maxIndex                 ds.w    1                ; offset: $54 (84)
  72. cellArray                 ds.w    1                ; offset: $56 (86) <-- really an array of length one
  73. sizeof                     EQU *                    ; size:   $58 (88)
  74.                         ENDR
  75. ; typedef struct ListRec *                ListPtr
  76.  
  77. ; typedef ListPtr *                        ListHandle
  78.  
  79. ;  ListRef is obsolete.  Use ListHandle. 
  80. ; typedef ListHandle                     ListRef
  81.  
  82.  
  83.  
  84.  
  85. lDoVAutoscroll                    EQU        2
  86. lDoHAutoscroll                    EQU        1
  87. lOnlyOne                        EQU        -128
  88. lExtendDrag                        EQU        64
  89. lNoDisjoint                        EQU        32
  90. lNoExtend                        EQU        16
  91. lNoRect                            EQU        8
  92. lUseSense                        EQU        4
  93. lNoNilHilite                    EQU        2
  94.  
  95. lDoVAutoscrollBit                EQU        1
  96. lDoHAutoscrollBit                EQU        0
  97. lOnlyOneBit                        EQU        7
  98. lExtendDragBit                    EQU        6
  99. lNoDisjointBit                    EQU        5
  100. lNoExtendBit                    EQU        4
  101. lNoRectBit                        EQU        3
  102. lUseSenseBit                    EQU        2
  103. lNoNilHiliteBit                    EQU        1
  104.  
  105.  
  106. lInitMsg                        EQU        0
  107. lDrawMsg                        EQU        1
  108. lHiliteMsg                        EQU        2
  109. lCloseMsg                        EQU        3
  110.  
  111.  
  112.  
  113.  
  114.  
  115. ;
  116. ; pascal ListHandle LNew(const Rect *rView, const ListBounds *dataBounds, Point cSize, short theProc, WindowPtr theWindow, Boolean drawIt, Boolean hasGrow, Boolean scrollHoriz, Boolean scrollVert)
  117. ;
  118.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  119.         Macro
  120.         _LNew
  121.             move.w              #$0044,-(sp)
  122.             dc.w                $A9E7
  123.         EndM
  124.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  125.         IMPORT_CFM_FUNCTION LNew
  126.     ENDIF
  127.  
  128. ;
  129. ; pascal void LDispose(ListHandle lHandle)
  130. ;
  131.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  132.         Macro
  133.         _LDispose
  134.             move.w              #$0028,-(sp)
  135.             dc.w                $A9E7
  136.         EndM
  137.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  138.         IMPORT_CFM_FUNCTION LDispose
  139.     ENDIF
  140.  
  141. ;
  142. ; pascal short LAddColumn(short count, short colNum, ListHandle lHandle)
  143. ;
  144.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  145.         Macro
  146.         _LAddColumn
  147.             move.w              #$0004,-(sp)
  148.             dc.w                $A9E7
  149.         EndM
  150.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  151.         IMPORT_CFM_FUNCTION LAddColumn
  152.     ENDIF
  153.  
  154. ;
  155. ; pascal short LAddRow(short count, short rowNum, ListHandle lHandle)
  156. ;
  157.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  158.         Macro
  159.         _LAddRow
  160.             move.w              #$0008,-(sp)
  161.             dc.w                $A9E7
  162.         EndM
  163.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  164.         IMPORT_CFM_FUNCTION LAddRow
  165.     ENDIF
  166.  
  167. ;
  168. ; pascal void LDelColumn(short count, short colNum, ListHandle lHandle)
  169. ;
  170.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  171.         Macro
  172.         _LDelColumn
  173.             move.w              #$0020,-(sp)
  174.             dc.w                $A9E7
  175.         EndM
  176.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  177.         IMPORT_CFM_FUNCTION LDelColumn
  178.     ENDIF
  179.  
  180. ;
  181. ; pascal void LDelRow(short count, short rowNum, ListHandle lHandle)
  182. ;
  183.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  184.         Macro
  185.         _LDelRow
  186.             move.w              #$0024,-(sp)
  187.             dc.w                $A9E7
  188.         EndM
  189.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  190.         IMPORT_CFM_FUNCTION LDelRow
  191.     ENDIF
  192.  
  193. ;
  194. ; pascal Boolean LGetSelect(Boolean next, Cell *theCell, ListHandle lHandle)
  195. ;
  196.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  197.         Macro
  198.         _LGetSelect
  199.             move.w              #$003C,-(sp)
  200.             dc.w                $A9E7
  201.         EndM
  202.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  203.         IMPORT_CFM_FUNCTION LGetSelect
  204.     ENDIF
  205.  
  206. ;
  207. ; pascal Cell LLastClick(ListHandle lHandle)
  208. ;
  209.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  210.         Macro
  211.         _LLastClick
  212.             move.w              #$0040,-(sp)
  213.             dc.w                $A9E7
  214.         EndM
  215.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  216.         IMPORT_CFM_FUNCTION LLastClick
  217.     ENDIF
  218.  
  219. ;
  220. ; pascal Boolean LNextCell(Boolean hNext, Boolean vNext, Cell *theCell, ListHandle lHandle)
  221. ;
  222.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  223.         Macro
  224.         _LNextCell
  225.             move.w              #$0048,-(sp)
  226.             dc.w                $A9E7
  227.         EndM
  228.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  229.         IMPORT_CFM_FUNCTION LNextCell
  230.     ENDIF
  231.  
  232. ;
  233. ; pascal Boolean LSearch(const void *dataPtr, short dataLen, ListSearchUPP searchProc, Cell *theCell, ListHandle lHandle)
  234. ;
  235.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  236.         Macro
  237.         _LSearch
  238.             move.w              #$0054,-(sp)
  239.             dc.w                $A9E7
  240.         EndM
  241.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  242.         IMPORT_CFM_FUNCTION LSearch
  243.     ENDIF
  244.  
  245. ;
  246. ; pascal void LSize(short listWidth, short listHeight, ListHandle lHandle)
  247. ;
  248.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  249.         Macro
  250.         _LSize
  251.             move.w              #$0060,-(sp)
  252.             dc.w                $A9E7
  253.         EndM
  254.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  255.         IMPORT_CFM_FUNCTION LSize
  256.     ENDIF
  257.  
  258. ;
  259. ; pascal void LSetDrawingMode(Boolean drawIt, ListHandle lHandle)
  260. ;
  261.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  262.         Macro
  263.         _LSetDrawingMode
  264.             move.w              #$002C,-(sp)
  265.             dc.w                $A9E7
  266.         EndM
  267.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  268.         IMPORT_CFM_FUNCTION LSetDrawingMode
  269.     ENDIF
  270.  
  271. ;
  272. ; pascal void LScroll(short dCols, short dRows, ListHandle lHandle)
  273. ;
  274.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  275.         Macro
  276.         _LScroll
  277.             move.w              #$0050,-(sp)
  278.             dc.w                $A9E7
  279.         EndM
  280.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  281.         IMPORT_CFM_FUNCTION LScroll
  282.     ENDIF
  283.  
  284. ;
  285. ; pascal void LAutoScroll(ListHandle lHandle)
  286. ;
  287.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  288.         Macro
  289.         _LAutoScroll
  290.             move.w              #$0010,-(sp)
  291.             dc.w                $A9E7
  292.         EndM
  293.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  294.         IMPORT_CFM_FUNCTION LAutoScroll
  295.     ENDIF
  296.  
  297. ;
  298. ; pascal void LUpdate(RgnHandle theRgn, ListHandle lHandle)
  299. ;
  300.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  301.         Macro
  302.         _LUpdate
  303.             move.w              #$0064,-(sp)
  304.             dc.w                $A9E7
  305.         EndM
  306.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  307.         IMPORT_CFM_FUNCTION LUpdate
  308.     ENDIF
  309.  
  310. ;
  311. ; pascal void LActivate(Boolean act, ListHandle lHandle)
  312. ;
  313.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  314.         Macro
  315.         _LActivate
  316.             clr.w               -(sp)
  317.             dc.w                $A9E7
  318.         EndM
  319.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  320.         IMPORT_CFM_FUNCTION LActivate
  321.     ENDIF
  322.  
  323. ;
  324. ; pascal void LCellSize(Point cSize, ListHandle lHandle)
  325. ;
  326.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  327.         Macro
  328.         _LCellSize
  329.             move.w              #$0014,-(sp)
  330.             dc.w                $A9E7
  331.         EndM
  332.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  333.         IMPORT_CFM_FUNCTION LCellSize
  334.     ENDIF
  335.  
  336. ;
  337. ; pascal Boolean LClick(Point pt, short modifiers, ListHandle lHandle)
  338. ;
  339.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  340.         Macro
  341.         _LClick
  342.             move.w              #$0018,-(sp)
  343.             dc.w                $A9E7
  344.         EndM
  345.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  346.         IMPORT_CFM_FUNCTION LClick
  347.     ENDIF
  348.  
  349. ;
  350. ; pascal void LAddToCell(const void *dataPtr, short dataLen, Cell theCell, ListHandle lHandle)
  351. ;
  352.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  353.         Macro
  354.         _LAddToCell
  355.             move.w              #$000C,-(sp)
  356.             dc.w                $A9E7
  357.         EndM
  358.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  359.         IMPORT_CFM_FUNCTION LAddToCell
  360.     ENDIF
  361.  
  362. ;
  363. ; pascal void LClrCell(Cell theCell, ListHandle lHandle)
  364. ;
  365.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  366.         Macro
  367.         _LClrCell
  368.             move.w              #$001C,-(sp)
  369.             dc.w                $A9E7
  370.         EndM
  371.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  372.         IMPORT_CFM_FUNCTION LClrCell
  373.     ENDIF
  374.  
  375. ;
  376. ; pascal void LGetCell(void *dataPtr, short *dataLen, Cell theCell, ListHandle lHandle)
  377. ;
  378.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  379.         Macro
  380.         _LGetCell
  381.             move.w              #$0038,-(sp)
  382.             dc.w                $A9E7
  383.         EndM
  384.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  385.         IMPORT_CFM_FUNCTION LGetCell
  386.     ENDIF
  387.  
  388. ;
  389. ; pascal void LRect(Rect *cellRect, Cell theCell, ListHandle lHandle)
  390. ;
  391.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  392.         Macro
  393.         _LRect
  394.             move.w              #$004C,-(sp)
  395.             dc.w                $A9E7
  396.         EndM
  397.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  398.         IMPORT_CFM_FUNCTION LRect
  399.     ENDIF
  400.  
  401. ;
  402. ; pascal void LSetCell(const void *dataPtr, short dataLen, Cell theCell, ListHandle lHandle)
  403. ;
  404.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  405.         Macro
  406.         _LSetCell
  407.             move.w              #$0058,-(sp)
  408.             dc.w                $A9E7
  409.         EndM
  410.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  411.         IMPORT_CFM_FUNCTION LSetCell
  412.     ENDIF
  413.  
  414. ;
  415. ; pascal void LSetSelect(Boolean setIt, Cell theCell, ListHandle lHandle)
  416. ;
  417.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  418.         Macro
  419.         _LSetSelect
  420.             move.w              #$005C,-(sp)
  421.             dc.w                $A9E7
  422.         EndM
  423.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  424.         IMPORT_CFM_FUNCTION LSetSelect
  425.     ENDIF
  426.  
  427. ;
  428. ; pascal void LDraw(Cell theCell, ListHandle lHandle)
  429. ;
  430.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  431.         Macro
  432.         _LDraw
  433.             move.w              #$0030,-(sp)
  434.             dc.w                $A9E7
  435.         EndM
  436.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  437.         IMPORT_CFM_FUNCTION LDraw
  438.     ENDIF
  439.  
  440.  
  441. ;
  442. ; pascal void LGetCellDataLocation(short *offset, short *len, Cell theCell, ListHandle lHandle)
  443. ;
  444.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  445.         Macro
  446.         _LGetCellDataLocation
  447.             move.w              #$0034,-(sp)
  448.             dc.w                $A9E7
  449.         EndM
  450.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  451.         IMPORT_CFM_FUNCTION LGetCellDataLocation
  452.     ENDIF
  453.  
  454.  
  455.     IF OLDROUTINENAMES THEN
  456.     ENDIF    ; OLDROUTINENAMES
  457.  
  458.     ENDIF ; __LISTS__ 
  459.  
  460.